import constant from '../../constant';
import { post, upload } from '../request';

export default {
    userLogin: (loginInfo) => post(constant.API.COMMON.USER_LOGIN, loginInfo),
    userLogout: () => post(constant.API.COMMON.USER_LOGOUT),
    userInfo: () => post(constant.API.COMMON.USER_INFO),
    permMenu: () => post(constant.API.COMMON.PERM_MENU),
    upload: (file) => {
        let form  = new FormData()
        form.append("file", file)
        return upload(constant.API.COMMON.UPLOAD, form)
    }
}
